//
//  ClockTableView.swift
//  SkyWeather
//
//  Created by lx on 2020/11/4.
//

import UIKit

class SkyTableView: UITableView {

    override func willMove(toSuperview newSuperview: UIView?) {
        super.willMove(toSuperview: newSuperview)
        
        if #available(iOS 11.0, *) {
            contentInsetAdjustmentBehavior = .never
        } else {
            // Fallback on earlier versions
        }
        
        separatorStyle = .none
        separatorColor = .line
        backgroundColor = .clear
    }

    override func touchesShouldCancel(in view: UIView) -> Bool {
        if view.isKind(of: UIControl.self) {
            return true
        }
        
        return super.touchesShouldCancel(in: view)
    }
}
